home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / cosmicfozmik.swf / scripts / frame_7 / PlaceObject2_160_66 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2007-09-27  |  4.2 KB  |  167 lines

  1. onClipEvent(enterFrame){
  2.    if(_root._currentframe == 31)
  3.    {
  4.       this._visible = false;
  5.    }
  6.    if(_root.gameReallyOver == 1)
  7.    {
  8.       _X = -10000;
  9.       _Y = 10000;
  10.       _visible = false;
  11.    }
  12.    if(_root.lives >= 1)
  13.    {
  14.       if(_root.gameOn == 1)
  15.       {
  16.          if(isNegative == 0 && _root.negativeColor == 1)
  17.          {
  18.             myColor.negative();
  19.             isNegative = 1;
  20.          }
  21.          if(isNegative == 1 && _root.negativeColor == 0)
  22.          {
  23.             myColor.setTransform(orig);
  24.             isNegative = 0;
  25.          }
  26.          if(_root.speed > 0)
  27.          {
  28.             _root.speed -= 0.4;
  29.          }
  30.          if(_root.speed < 0)
  31.          {
  32.             _root.speed = 0;
  33.          }
  34.          if(_root.dir == 1 && this._y > 20)
  35.          {
  36.             _Y = _Y - _root.speed;
  37.          }
  38.          if(_root.dir == 2 && this._y > 20 && this._x < 630)
  39.          {
  40.             _Y = _Y - _root.speed;
  41.             _X = _X + _root.speed;
  42.          }
  43.          if(_root.dir == 3 && this._x < 630)
  44.          {
  45.             _X = _X + _root.speed;
  46.          }
  47.          if(_root.dir == 4 && this._y < 380 && this._x < 630)
  48.          {
  49.             _Y = _Y + _root.speed;
  50.             _X = _X + _root.speed;
  51.          }
  52.          if(_root.dir == 5 && this._y < 380)
  53.          {
  54.             _Y = _Y + _root.speed;
  55.          }
  56.          if(_root.dir == 6 && this._x > 20 && this._y < 380)
  57.          {
  58.             _Y = _Y + _root.speed;
  59.             _X = _X - _root.speed;
  60.          }
  61.          if(_root.dir == 7 && this._x > 20)
  62.          {
  63.             _X = _X - _root.speed;
  64.          }
  65.          if(_root.dir == 8 && this._x > 20 && this._y > 20)
  66.          {
  67.             _Y = _Y - _root.speed;
  68.             _X = _X - _root.speed;
  69.          }
  70.          if(Key.isDown(38))
  71.          {
  72.             if(_root.dir == 4 || _root.dir == 5 || _root.dir == 6)
  73.             {
  74.                _root.speed = 0;
  75.             }
  76.             _root.dir = 1;
  77.             if(_root.speed < _root.speedMax)
  78.             {
  79.                _root.speed = _root.speed + 1;
  80.             }
  81.          }
  82.          if(Key.isDown(39))
  83.          {
  84.             if(_root.dir == 6 || _root.dir == 7 || _root.dir == 8)
  85.             {
  86.                _root.speed = 0;
  87.             }
  88.             _root.dir = 3;
  89.             if(_root.speed < _root.speedMax)
  90.             {
  91.                _root.speed = _root.speed + 1;
  92.             }
  93.          }
  94.          if(Key.isDown(40) && _Y < 387)
  95.          {
  96.             if(_root.dir == 1 || _root.dir == 2 || _root.dir == 8)
  97.             {
  98.                _root.speed = 0;
  99.             }
  100.             _root.dir = 5;
  101.             if(_root.speed < _root.speedMax)
  102.             {
  103.                _root.speed = _root.speed + 1;
  104.             }
  105.          }
  106.          if(Key.isDown(37) && _X > 13)
  107.          {
  108.             if(_root.dir == 2 || _root.dir == 3 || _root.dir == 4)
  109.             {
  110.                _root.speed = 0;
  111.             }
  112.             _root.dir = 7;
  113.             if(_root.speed < _root.speedMax)
  114.             {
  115.                _root.speed = _root.speed + 1;
  116.             }
  117.          }
  118.          if(Key.isDown(38) && Key.isDown(39))
  119.          {
  120.             _root.dir = 2;
  121.             if(_root.speed < _root.speedMax)
  122.             {
  123.                _root.speed = _root.speed + 1;
  124.             }
  125.          }
  126.          if(Key.isDown(38) && Key.isDown(37))
  127.          {
  128.             _root.dir = 8;
  129.             if(_root.speed < _root.speedMax)
  130.             {
  131.                _root.speed = _root.speed + 1;
  132.             }
  133.          }
  134.          if(Key.isDown(40) && Key.isDown(37))
  135.          {
  136.             _root.dir = 6;
  137.             if(_root.speed < _root.speedMax)
  138.             {
  139.                _root.speed = _root.speed + 1;
  140.             }
  141.          }
  142.          if(Key.isDown(39) && Key.isDown(40))
  143.          {
  144.             _root.dir = 4;
  145.             if(_root.speed < _root.speedMax)
  146.             {
  147.                _root.speed = _root.speed + 1;
  148.             }
  149.          }
  150.       }
  151.    }
  152.    if(_root.lives == 0)
  153.    {
  154.       if(deathCount < 100)
  155.       {
  156.          deathCount += 5;
  157.          _width++;
  158.          _height++;
  159.          _alpha = _alpha - 5;
  160.       }
  161.       if(deathCount == 100)
  162.       {
  163.          _alpha = 0;
  164.       }
  165.    }
  166. }
  167.